package com.framework.modules.base.service.impl;

import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.framework.common.utils.PageUtils;
import com.framework.common.utils.Query;

import com.framework.modules.base.dao.IdcardVerifyHistoryDao;
import com.framework.modules.base.entity.IdcardVerifyHistoryEntity;
import com.framework.modules.base.service.IdcardVerifyHistoryService;


@Service("idcardVerifyHistoryService")
public class IdcardVerifyHistoryServiceImpl extends ServiceImpl<IdcardVerifyHistoryDao, IdcardVerifyHistoryEntity> implements IdcardVerifyHistoryService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<IdcardVerifyHistoryEntity> page = this.selectPage(
                new Query<IdcardVerifyHistoryEntity>(params).getPage(),
                new EntityWrapper<IdcardVerifyHistoryEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public PageUtils queryIdcardVerifyHistory(Map<String, Object> params) {
        int current=Integer.parseInt(params.get("page").toString());
        int limit=Integer.parseInt(params.get("limit").toString());
        Page page=new Page(current,limit);
        return new PageUtils(page.setRecords(this.baseMapper.queryIdcardVerifyHistory(page,params)));
    }

}
